<template>
    <el-card class="box-card">
        <div slot="header" class="clearfix">
            <span>粉丝列表</span>
        </div>
        <!--  -->
         <div ref="fensstat" id="main" style="width: 600px;height:400px;">

         </div>
    </el-card>
</template>

<script>
import echarts from 'echarts'
export default {
  mounted () {
    this.paintPic()
  },
  methods: {
    paintPic () {
    //   var myChart = echarts.init(document.getElementById('main'))
      var myChart = echarts.init(this.$refs.fensstat)
      var option = {
        series: [
          {
            name: '访问来源',
            type: 'pie',
            radius: '55%',
            data: [
              { value: 235, name: '视频广告' },
              { value: 274, name: '联盟广告' },
              { value: 310, name: '邮件营销' },
              { value: 335, name: '直接访问' },
              { value: 400, name: '搜索引擎' }
            ]
          }
        ]
      }

      // 使用刚指定的配置项和数据显示图表。
      myChart.setOption(option)
    }
  }

}
</script>

<style>

</style>
